Fix "past the beginning of string" test.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 18 Mar 2005 19:33:47 +0000 (19:33 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 18 Mar 2005 19:33:47 +0000 (19:33 +0000)
gpsbabel/mkshort.c

index 1efcb7812b3c2bb0f1af8c0a9ad349d05390a66a..8edef7683a41813265cbf5e26c55b61f05c876ee 100644 (file)
@@ -387,7 +387,7 @@ mkshort(void *h, const char *istring)
         * Walk in the Woods 2.
         */
        np = ostring + strlen(ostring);
-       while (*np && isdigit(*(np-1) )) {
+       while (*(np-1) && isdigit(*(np-1) )) {
                np--;
        }
        if (np) {